home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / FPDIZ10.lha / PFiles / FPDIZ / Loaders / .S3M < prev    next >
Text File  |  1995-01-10  |  2KB  |  45 lines

  1. /**/
  2. options results;parse arg ar1'|'ar2;call pragma('P',-5)
  3.  
  4. /* == Place your code here! "AR1" is the path/file, "AR2" is the temp file == */
  5.  
  6. /*           Screamtracker(S3m) Loader Module - Made for FPDiz
  7.  
  8.                                    V1.1
  9.  
  10.    This was as hard as hell to figure out, but I think I figured it out now.
  11.  
  12.      If you find any bugs in this please report them to mUb@912:1000/0.0,
  13.                Chris Brundell@2:2502/12.0 or mub@reliant.psu.edu             */
  14.  
  15. open('input',ar1,R)
  16. temp=readch('input',96);lf='0a'x
  17. parse var temp SongName'00'x 28 Type 29 shit 31 Ordnum 33 InsNum 35 PatNum 37 Flags 39 Created 41 FileFormat 43 SCRM 47 gv 48 is 49 it 50 mv 51
  18. desc= '.'center(translate(strip(songname),'-',' '),42,'-')'.'lf
  19. desc=desc||"|"center(c2d(PatNum)' patterns - 'c2d(InsNum)' instruments',42,'-')"|"lf
  20. temp=readch('input',c2d(OrdNum))
  21. do n=1 to min(c2d(InsNum),7)
  22.         samppointer.n=c2d(readch('input',2))/16
  23.         end
  24. x=0
  25. do m=1 to n-1
  26.         seek('input',samppointer.m,B)
  27.         temp=readch('input',80)
  28.         parse var temp shit 49 sampname'00'x 75
  29.         if strip(sampname)~='' then do
  30.                 x=x+1
  31.                 sampname.x=sampname
  32.                 end
  33.         end
  34. x=min(x,6)
  35. do n=1 to x-1
  36.         desc=desc||'|'center(strip(sampname.n),42)'|'lf
  37.         end
  38.  
  39. desc=desc||"`"center(translate(strip(sampname.n),'-',' '),42,'-')"'"
  40.  
  41. /* =========== Writes the "DESC" variable to the temp file. =========== */
  42.  
  43. call open(fp,ar2,'W');call writeln(fp,desc);call close(fp)
  44. exit
  45.